<%@tag pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="consignum" tagdir="/WEB-INF/tags"%>
<%@attribute name="id"%>
<%@attribute name="styleClass"%>
<%@attribute name="style"%>
<%@attribute name="icon"%>
<%@attribute name="title"%>
<%@attribute name="tooltip"%>
<%@attribute name="tooltipDirection"%>
<%@attribute name="rendered" type="java.lang.Boolean"%>
<%@attribute name="loading" type="java.lang.Object"%>
<%@attribute name="execute" required="true"%>
<%@attribute name="update" required="true"%>
<%@attribute name="action" required="true"%>
<%@attribute name="value" type="java.lang.Object"%>
<%@attribute name="conversation" type="java.lang.Object"%>
<%@attribute name="paramName" type="java.lang.Object"%>
<%@attribute name="paramValue" type="java.lang.Object"%>
<c:if test="${empty rendered or rendered eq true}">

		<c:if test="${not empty conversation}">
		   	<c:set var="actioCustom" value="${action}?cid=${conversation}" />
		   	  <c:if test="${empty paramValue}">
		   		<c:set var="actioCustom" value="${action}?cid=${conversation}" />
		 	 </c:if>
		 	 <c:if test="${not empty paramValue}">
		 	 	<c:set var="actioCustom" value="${action}?cid=${conversation}&${paramName}=${paramValue}" />
		 	 </c:if>
		   	
		 </c:if>
		 <c:if test="${empty conversation}">
		 	 <c:if test="${empty paramValue}">
		   		<c:set var="actioCustom" value="${action}" />
		 	 </c:if>
		 	 <c:if test="${not empty paramValue}">
		   		<c:set var="actioCustom" value="${action}?${paramName}=${paramValue}" />
		 	 </c:if>
		 </c:if>
		 
		<a href="javascript:void(0);" onclick="javascript: submitAjaxPartial('${execute}','${actioCustom}','${update}','${loading}');" 
		<consignum:renderedField field="name" value="${id}" />
		<consignum:renderedField field="class" value="${styleClass}" /> 
		
		<c:if test="${not empty tooltip}">
			<consignum:renderedField field="rel" value="tooltip" />
			<consignum:renderedField field="data-placement" value="${tooltipDirection}" defaultValue="top" />
			<consignum:renderedField field="data-original-title" value="${tooltip}" />
			<consignum:renderedField field="lang" value="tooltip" />
		</c:if>
		<consignum:renderedField field="value" value="${value}" /> 
		<consignum:renderedField field="style" value="${style}" /> > 
	<i class="<c:out value="${icon}" default=" " />"> </i> <c:out
			value="${value}" />
 </a>
</c:if>
